package com.ycl.consul.exveption;


import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class TestExcepition {

    @ExceptionHandler(RuntimeException.class)
    public String test(Exception str){

        String message = str.getMessage();

        return "运行时异常"+message;
    }
}
